<template>
	<view>
		<!-- 	<view-navbar></view-navbar> -->
		<view class="">
			<!--  -->
			<view class="ml32 h100 mt12 ms20"><u-search placeholder="手机号" @search="search" v-model="keyword" :showAction="true" actionText="取消"></u-search></view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			/* 搜索 */
			keyword: '',
			/* 结果 */
			friendList: [
				{
					name: '张三'
				},
				{
					name: '王五'
				},
				{
					name: '李四'
				},
				{
					name: '二狗'
				}
			]
		};
	},
	mounted() {
		// this.getFriendList();
	},
	methods: {
		async search(e) {
			// let { data } = await this.$api.get(`/user/userApi/user?phone=${e}`);
			let re = await this.$API.userApi.phoneFindUser(e);
			console.log(re, 're');
			uni.navigateTo({
				url: `/pages/searchFriend/searchFriend?data=` + encodeURIComponent(JSON.stringify(re))
			});
		}
		// async getFriendList() {
		// 	let re = await this.$api.get('/user/userFriendApi/apply/list');
		// 	console.log(re, 're');
		// 	this.friendList = re.data;
		// }
	}
};
</script>

<style lang="scss" scoped>
page {
	background-color: #e7e7e7;
}

::v-deep .u-search__action {
	color: #a332ff !important;
}

.word {
	// width: 750rpx;
	// height: 56rpx;
	// background: #FFFFFF;
	border-radius: 0rpx 0rpx 0rpx 0rpx;
	opacity: 1;
	margin: 12rpx 702rpx 10rpx 32rpx;
}

.menList {
	// width: 686rpx;
	// height: 108rpx;
	opacity: 1;

	.right {
		width: 590rpx;
		height: 108rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		opacity: 1;
	}
}
</style>
